from pygame.event import Event
from pygame import USEREVENT, NUMEVENTS

# __all__ = ('pause', 'unpause', 'jump', 'roll')

PAUSE = USEREVENT    # 24
def pause(**attributes):
    return Event(PAUSE, **attributes)

USEREVENT += 1
UNPAUSE = USEREVENT    # 25
def unpause(**attributes):
    return Event(UNPAUSE, **attributes)

USEREVENT += 1
SWITCHPAGE = USEREVENT    # 26
def switchpage(**attributes):
    return Event(SWITCHPAGE, **attributes)


USEREVENT += 1
ANSWER = USEREVENT    # 27. For check answer
def answer(answer, **attributes):
    return Event(ANSWER, answer=answer, **attributes)

USEREVENT += 1
RESULT = USEREVENT    # 28. For telling the page the answer is currect/wrong
def result(currect, answer=None, **attributes):
    return Event(RESULT, currect=currect, answer=answer, **attributes)

USEREVENT += 1
NEXTTOPIC = USEREVENT    # 29. For get the new topic
def nexttopic(**attributes):
    return Event(NEXTTOPIC, **attributes)

USEREVENT += 1
SAVE = USEREVENT    # 30. For save game
def save(**attributes):
    return Event(SAVE, **attributes)

USEREVENT += 1
LOAD = USEREVENT    # 31. For load game
def load(**attributes):
    return Event(LOAD, **attributes)

assert USEREVENT <= NUMEVENTS    # 32
